Drop gtk_recent_info_get_icon
authorMatthias Clasen <mclasen@redhat.com>
Mon, 23 Oct 2017 04:20:08 +0000 (06:20 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 23 Oct 2017 04:21:59 +0000 (06:21 +0200)
We are moving away from pixbuf-based apis.
Use gtk_recent_info_get_gicon instead.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkrecentmanager.c
gtk/gtkrecentmanager.h

index 040f2ae41bf971be9148594c330bba7a82651dac..d524bdda000f1d3634bee3970592d42b492cf161 100644 (file)
@@ -2391,7 +2391,6 @@ gtk_recent_info_has_application
 gtk_recent_info_create_app_info
 gtk_recent_info_get_groups
 gtk_recent_info_has_group
-gtk_recent_info_get_icon
 gtk_recent_info_get_gicon
 gtk_recent_info_get_short_name
 gtk_recent_info_get_uri_display
index 65bb3757507e4dfb5dba0137eb072ce9627f2405..c655091442a2a1bdba7e8fb34134d49d4ab05fa9 100644 (file)
@@ -2010,42 +2010,6 @@ get_icon_fallback (const gchar *icon_name,
   return retval;
 }
 
-/**
- * gtk_recent_info_get_icon:
- * @info: a #GtkRecentInfo
- * @size: the size of the icon in pixels
- *
- * Retrieves the icon of size @size associated to the resource MIME type.
- *
- * Returns: (nullable) (transfer full): a #GdkPixbuf containing the icon,
- *     or %NULL. Use g_object_unref() when finished using the icon.
- *
- * Since: 2.10
- */
-GdkPixbuf *
-gtk_recent_info_get_icon (GtkRecentInfo *info,
-                          gint           size)
-{
-  GdkPixbuf *retval = NULL;
-
-  g_return_val_if_fail (info != NULL, NULL);
-
-  if (info->mime_type)
-    retval = get_icon_for_mime_type (info->mime_type, size);
-
-  /* this function should never fail */
-  if (!retval)
-    {
-      if (info->mime_type &&
-          strcmp (info->mime_type, "x-directory/normal") == 0)
-        retval = get_icon_fallback ("folder", size);
-      else
-        retval = get_icon_fallback ("text-x-generic", size);
-    }
-
-  return retval;
-}
-
 /**
  * gtk_recent_info_get_gicon:
  * @info: a #GtkRecentInfo
index 9f15abe078f728f14ef1cc2a36b7a6e9794aaefe..f77684ce3238cd5b3e9cac822c69a44995007eab 100644 (file)
@@ -247,9 +247,6 @@ GDK_AVAILABLE_IN_ALL
 gboolean              gtk_recent_info_has_group            (GtkRecentInfo  *info,
                                                            const gchar    *group_name);
 GDK_AVAILABLE_IN_ALL
-GdkPixbuf *           gtk_recent_info_get_icon             (GtkRecentInfo  *info,
-                                                           gint            size);
-GDK_AVAILABLE_IN_ALL
 GIcon *               gtk_recent_info_get_gicon            (GtkRecentInfo  *info);
 GDK_AVAILABLE_IN_ALL
 gchar *               gtk_recent_info_get_short_name       (GtkRecentInfo  *info) G_GNUC_MALLOC;